![]() |
Programming - Object Oriented Code
OPENING QUESTIONS: I'll return your tests today and we'll go over those to start OBJECTIVES: I will be able to use the Code.Org development to do very basic object oriented coding during today's class. COURSE DOCUMENTS: Coding Specs Ver 1.64 is HERE My code sample for today is HERE (please be sure to rename that file to save it in your own library of programs/code WORDS FOR TODAY: Object Oriented Coding Samples: First Name:
2. Text boxes are a place for the user to type in alphanumeric data as required by the developer.
3. Buttons are objects that the developer adds to the screen as a way of both prompting the user to act and then causing an action or series of actions to occur when the user does so.
There are more types of objects as I'm sure you are aware but that will get us started for today. WORK O' THE DAY:
Please open today's code sample and rename it to save it in your own project library. Then "remix" the code (that's kind of a silly name) in order to save the existing file as the SAFE copy and the remixed version will be a working copy. You MUST create your own remix naming convention. Many students simply name each 'remix' as program01, program02, program03 etc... (the zeros are important in how code.org displays them) ═══════════════════════════ Notice that I have added *extensive* comments to my sample code. Comments are an essential part of coding. Many new programmers tend to minimize comments as being tedious and un-necessary. That is patently false and we'll discuss that at length in the days and weeks to come. Comments are a key way to communicate with other members of your development team. When you get hired to work with such a team, the expectation is you will code to a specific standard that team has adopted. That includes naming objects, variable and the code itself. The expectation among your team is that you will comment your code extensively. The reason for that is simple, no member of the team is indispensable to the project. If a member of the team is sick, quits, gets a new position in the company or for any other reason needs to be replaced or more likely, their work needs to be absorbed by the team. The team doesn't want to (nor should they!) spend needless hours pouring over the code to understand your work. Your code should explain itself and commenting is a HUGE part of that. ═══════════════════════════ I have deliberately misnamed some of the screen objects in my sample code. Find those errors and fix them in your copy of that code. Now you have some 'sandbox' time. In otherwords you get to just play around with my sample code, add new objects, make things appear, disappear, whatever comes to mind! |